<template>
	<view class="user">
		<view class="button" @click="qiehuan">切换为商家端</view>
		<view class="button" @click="exit">退出登录</view>
	</view>
</template>

<script>
	import {
		request
	} from '@/api/request';
	
	export default {
		data() {
			return {
				
			}
		},
		created() {
			
		},
		methods: {
			qiehuan(){
				uni.reLaunch({
					url: '/pages/index/index'
				})
			},
			exit() {
				uni.removeStorageSync('token');
	
				uni.showToast({
					title: '退出成功，请重新登录！',
					icon: 'none'
				}).then(() => {
					uni.reLaunch({
						url: '/pages/user/second/login'
					});
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.user{
		padding-top: 200rpx;
		
		.button {
			width: 94%;
			margin: 60rpx auto 0;
			text-align: center;
			height: 80rpx;
			line-height: 80rpx;
			border-radius: 10rpx;
			background: linear-gradient(270deg, #EAC59F, #E4B985, #FFF9CE);
			color: #806B1A;
			font-size: 36rpx;
		}
	}
</style>